import {
	HTTP
} from '@/common/js/http.js';

export class IndexModel extends HTTP {
	// banner
	getBannerList(position = 1) {
		return this.request({
			url: `/article/api/advert/show/${position}`
		})
	}

	// 导航
	getLabelList() {
		return this.request({
			url: '/article/api/category/label/list'
		})
	}

	// 课程
	getCourseList(
		query,
		current = 1,
		size = 8
	) {
		return this.request({
			url: '/course/api/course/search',
			method: 'POST',
			data: {
				...query,
				current,
				size
			}
		})
	}
}
